// 确定路由模式（一般纯前端的话就是哈希模式）创建路由对象  => 创建路由表 (视图和地址的对应关系)

import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
	history: createWebHashHistory(),
	routes: [
		{
			path: "/",
			name: "homePage",
			component: () => import("../view/homePage.vue"),
		},
		{
			path: "/test/:age?",
			name: "Test",
			component: () => import("../view/test.vue"),
		},
	],
});

// 导出路由表
export default router;
